﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace QYmall.Core.Model.Models
{
    /// <summary>
    /// 用户发票
    /// </summary>
    public class MemberInvoice
    {
        /// <summary>
        /// 自增ID
        /// </summary>
        [Display(Name = "自增ID")]
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        /// <summary>
        /// 所属用户
        /// </summary>
        [Display(Name = "所属用户")]
        public int UserId { get; set; }

        /// <summary>
        /// 发票抬头
        /// </summary>
        [Display(Name = "发票抬头")]
        [StringLength(128)]
        public string? Title { get; set; }

        /// <summary>
        /// 税号
        /// </summary>
        [Display(Name = "税号")]
        [StringLength(128)]
        public string? DutyParagraph { get; set; }

        /// <summary>
        /// 发票类型
        /// </summary>
        [Display(Name = "发票类型")]
        [Range(0, 9)]
        public int? InvoiceType { get; set; }        

        /// <summary>
        /// 创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        public DateTime AddTime { get; set; } = DateTime.Now;
    }
}
